<template>
    <div v-if="modal">
      <Modal
        v-model="modal"
        width="1800"
        title="导入网格人员数据">
       <dispose-excel :columns="columns" :url="url" :failedUrl="failedUrl"></dispose-excel>
      </Modal>
    </div>
</template>

<script>
import DisposeExcel from '../../dispose-excel/dispose-excel'
export default {
  name: 'import-excel',
  components: { DisposeExcel },
  data () {
    return {
      columns: [
        {
          align: 'center',
          title: '姓名',
          key: 'user_name',
          fixed: 'left'
        },
        {
          align: 'center',
          title: '身份证号',
          width: '160',
          key: 'cardno',
          fixed: 'left'
        },
        {
          align: 'center',
          title: '手机号码',
          width: '160',
          key: 'mobile'
        },
        {
          align: 'center',
          title: '与户主关系',
          key: 'relation'
        },
        {
          align: 'center',
          title: '常住类型',
          key: 'user_type'
        },
        {
          align: 'center',
          title: '户籍类型',
          key: 'huji_type'
        },
        {
          align: 'center',
          title: '是否空挂户',
          key: 'is_kgh'
        },
        {
          align: 'center',
          title: '居住类型',
          key: 'juzhu_type'
        },
        {
          align: 'center',
          title: '小区名称（网格）',
          key: 'garden_name'
        },
        {
          align: 'center',
          title: '楼名称',
          key: 'building_name'
        },
        {
          align: 'center',
          title: '单元名称',
          key: 'unit_name'
        },
        {
          align: 'center',
          title: '层',
          key: 'floor_name'
        },
        {
          align: 'center',
          title: '户',
          key: 'doorplate_name'
        }
        // {
        //   align: 'center',
        //   title: '导入状态',
        //   slot: 'import_type',
        //   fixed: 'right'
        // },
        // {
        //   align: 'center',
        //   title: '失败原因',
        //   key: 'cause',
        //   fixed: 'right'
        // }
      ],
      modal: false,
      url: '/api/ac/grid/importGridUserInfoService/saveGridUserInfo',
      failedUrl: '/api/as/grid/userGrid/findFailedList'
    }
  },
  methods: {
    // 初始化
    init () {
      this.modal = true
    }
  }
}
</script>

<style scoped>

</style>
